#ifndef __BRANCH1_BASE_TRIGGER_EVENT_HANDLER_H__
#define __BRANCH1_BASE_TRIGGER_EVENT_HANDLER_H__
#include "Branch1BaseConfig.h"
namespace DAISY
{
	class _BranchBaseExport TriggerEventHandlerCallback
	{
	public:
		virtual void execute(Event * evt) = 0;
		virtual ~TriggerEventHandlerCallback(void){}
	};


	class _BranchBaseExport TriggerEventHandler: public EventHandler
	{
	public:
		TriggerEventHandler(void);
		void stop(void);

		inline bool isEnable(void) const {return isInWorld() && _callback;}
		void doExecute(Event * evt);
		void setCallback(TriggerEventHandlerCallback * callback);
	private:
		TriggerEventHandlerCallback * _callback;

	};


	typedef boost::shared_ptr<TriggerEventHandler>  TriggerEventHandlerPtr;

}


#endif
